package com.kehutong.wxapi.response;

import org.coraframework.json.annotation.JSONField;

/**
 * 获取入群欢迎语素材响应对象
 * @author: liukunlong
 * @date: 2021-03-05 10:30
 */
public class GroupWelcomeTemplateGetResponse {

    /**
     * errcode
     */ /**
     * errcode : 0
     * errmsg : ok
     * text : {"content":"文本消息内容"}
     * image : {"pic_url":"http://p.qpic.cn/pic_wework/XXXXX"}
     * link : {"title":"消息标题","picurl":"https://example.pic.com/path","desc":"消息描述","url":"https://example.link.com/path"}
     * miniprogram : {"title":"消息标题","pic_media_id":"MEDIA_ID","appid":"wx8bd80126147df384","page":"/path/index"}
     */

    @JSONField(name = "errcode")
    private Integer errcode;
    /**
     * errmsg
     */
    @JSONField(name = "errmsg")
    private String errmsg;
    /**
     * text
     */
    @JSONField(name = "text")
    private TextDTO text;
    /**
     * image
     */
    @JSONField(name = "image")
    private ImageDTO image;
    /**
     * link
     */
    @JSONField(name = "link")
    private LinkDTO link;
    /**
     * miniprogram
     */
    @JSONField(name = "miniprogram")
    private MiniprogramDTO miniprogram;

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public TextDTO getText() {
        return text;
    }

    public void setText(TextDTO text) {
        this.text = text;
    }

    public ImageDTO getImage() {
        return image;
    }

    public void setImage(ImageDTO image) {
        this.image = image;
    }

    public LinkDTO getLink() {
        return link;
    }

    public void setLink(LinkDTO link) {
        this.link = link;
    }

    public MiniprogramDTO getMiniprogram() {
        return miniprogram;
    }

    public void setMiniprogram(MiniprogramDTO miniprogram) {
        this.miniprogram = miniprogram;
    }

    public static class TextDTO {
        /**
         * content
         */ /**
         * content : 文本消息内容
         */

        @JSONField(name = "content")
        private String content;

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }
    }

    public static class ImageDTO {
        /**
         * picUrl
         */ /**
         * pic_url : http://p.qpic.cn/pic_wework/XXXXX
         */

        @JSONField(name = "pic_url")
        private String picUrl;

        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }
    }

    public static class LinkDTO {
        /**
         * title
         */ /**
         * title : 消息标题
         * picurl : https://example.pic.com/path
         * desc : 消息描述
         * url : https://example.link.com/path
         */

        @JSONField(name = "title")
        private String title;
        /**
         * picurl
         */
        @JSONField(name = "picurl")
        private String picurl;
        /**
         * desc
         */
        @JSONField(name = "desc")
        private String desc;
        /**
         * url
         */
        @JSONField(name = "url")
        private String url;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getPicurl() {
            return picurl;
        }

        public void setPicurl(String picurl) {
            this.picurl = picurl;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    public static class MiniprogramDTO {
        /**
         * title
         */ /**
         * title : 消息标题
         * pic_media_id : MEDIA_ID
         * appid : wx8bd80126147df384
         * page : /path/index
         */

        @JSONField(name = "title")
        private String title;
        /**
         * picMediaId
         */
        @JSONField(name = "pic_media_id")
        private String picMediaId;
        /**
         * appid
         */
        @JSONField(name = "appid")
        private String appid;
        /**
         * page
         */
        @JSONField(name = "page")
        private String page;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getPicMediaId() {
            return picMediaId;
        }

        public void setPicMediaId(String picMediaId) {
            this.picMediaId = picMediaId;
        }

        public String getAppid() {
            return appid;
        }

        public void setAppid(String appid) {
            this.appid = appid;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }
    }
}
